CREATE TABLE [dbo].[Party]
(
[Oid] [uniqueidentifier] NOT NULL ROWGUIDCOL,
[Photo] [varbinary] (max) NULL,
[Address1] [uniqueidentifier] NULL,
[Address2] [uniqueidentifier] NULL,
[OptimisticLockField] [int] NULL,
[GCRecord] [int] NULL,
[ObjectType] [int] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[Party] ADD CONSTRAINT [PK_Party] PRIMARY KEY CLUSTERED  ([Oid]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [iAddress1_Party] ON [dbo].[Party] ([Address1]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [iAddress2_Party] ON [dbo].[Party] ([Address2]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [iGCRecord_Party] ON [dbo].[Party] ([GCRecord]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [iObjectType_Party] ON [dbo].[Party] ([ObjectType]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Party] WITH NOCHECK ADD CONSTRAINT [FK_Party_Address1] FOREIGN KEY ([Address1]) REFERENCES [dbo].[Address] ([Oid]) NOT FOR REPLICATION
GO
ALTER TABLE [dbo].[Party] WITH NOCHECK ADD CONSTRAINT [FK_Party_Address2] FOREIGN KEY ([Address2]) REFERENCES [dbo].[Address] ([Oid]) NOT FOR REPLICATION
GO
ALTER TABLE [dbo].[Party] WITH NOCHECK ADD CONSTRAINT [FK_Party_ObjectType] FOREIGN KEY ([ObjectType]) REFERENCES [dbo].[XPObjectType] ([OID]) NOT FOR REPLICATION
GO
